from fastapi import HTTPException,status


def create_http_exception(status_code: int = 400, detail: str = "Bad Request"):
    """
    创建一个新的 HTTPException 实例。

    :param status_code: HTTP 状态码
    :param detail: 错误详情提示语
    :return: HTTPException 实例
    """
    return HTTPException(status_code=status_code, detail=detail)


# UsernameAlreadyTaken = HTTPException(
#     status_code=400,
#     detail="当前用户名已存在"
# )

# OrgNotFound = HTTPException(
#     status_code=400,
#     detail="当前所属组织机构不存在"
# )

# InvalidUserName = HTTPException(
#     status_code=400,
#     detail="当前用户不存在"
# )


# UserPasswordNotMatch = HTTPException(
#     status_code=401,
#     detail="用户名和密码不匹配"
# )

# OldPasswordFault = HTTPException(
#     status_code=401,
#     detail="旧密码输入错误"
# )

# InvalidPermissions = HTTPException(
#     status_code=401,
#     detail="无访问权限"
# )

# NotFound = HTTPException(
#     status_code=404,
#     detail="请求针对的是不存在的记录，服务器没有进行操作"
# )

# DoctorNumAlreadyTaken = HTTPException(
#     status_code=400,
#     detail="医生工号已存在"
# )

# ExistingMenuName  = HTTPException(
#     status_code=status.HTTP_400_BAD_REQUEST,
#     detail="菜单名称已存在"
# )

# NotExistingParentMenuId  = HTTPException(
#     status_code=status.HTTP_400_BAD_REQUEST,
#     detail="父级菜单不存在"
# )

# ExistingOrgName = HTTPException(
#     status_code=status.HTTP_400_BAD_REQUEST,
#     detail="组织机构名称已存在"
# )

# ExistingOrgCode = HTTPException(
#     status_code=status.HTTP_400_BAD_REQUEST,
#     detail="组织机构编码已存在"
# )

# ExistingOrgParentId = HTTPException(
#     status_code=status.HTTP_400_BAD_REQUEST,
#     detail="当前组织机构的父级机构不存在"
# )

# ExistingBaseScale = HTTPException(
#     status_code=status.HTTP_400_BAD_REQUEST,
#     detail="基础量表名称已存在"
# )

# ScaleNotExist = HTTPException(
#     status_code=status.HTTP_400_BAD_REQUEST,
#     detail="量表不存在"
# )


# ExistingScalePackage = HTTPException(
#     status_code=status.HTTP_400_BAD_REQUEST,
#     detail="量表套餐名称已存在"
# )

# ScaleDetailNotExist = HTTPException(
#     status_code=status.HTTP_400_BAD_REQUEST,
#     detail="量表详情不存在"
# )

# ScaleDetailNotQues = HTTPException(
#     status_code=status.HTTP_400_BAD_REQUEST,
#     detail="发布失败，量表至少包含一个题型或量表"
# )

# ScaleDetailNotEdit = HTTPException(
#     status_code=status.HTTP_400_BAD_REQUEST,
#     detail="当前量表详情不可编辑"
# )

# QuestionTypeNotExist = HTTPException(
#     status_code=status.HTTP_400_BAD_REQUEST,
#     detail="题目类型不存在"
# )

# ScaleNotPublished = HTTPException(
#     status_code=status.HTTP_400_BAD_REQUEST,
#     detail="当前量表未发布"
# )

# ScaleAnswerNotExist = HTTPException(
#     status_code=status.HTTP_400_BAD_REQUEST,
#     detail="量表答题链接已失效"
# )
